package benchmark;

import anaydis.sort.SorterType;
import anaydis.sort.benchmark.BenchmarkSorter;
import anaydis.sort.gui.SorterListener;
import com.sun.istack.internal.NotNull;

import java.util.Comparator;
import java.util.List;

public class Benchmark implements SorterListener {
    private int comparisons;
    private int swaps;

    public Benchmark(){
        comparisons = 0;
        swaps = 0;
    }

    public void greater(int i, int i1) {
        comparisons++;
    }

    public void equals(int i, int i1) {
        comparisons++;
    }

    public void swap(int i, int i1) {
        swaps++;
    }

    public void box(int i, int i1) {
        //To change body of implemented methods use File | Settings | File Templates.
    }

    public void copy(int i, int i1, boolean b) {
        //To change body of implemented methods use File | Settings | File Templates.
    }

    public int getComparisons(){
        int c = comparisons;
        comparisons = 0;
        return c;
    }

    public int getSwaps(){
        int s = swaps;
        swaps = 0;
        return s;
    }
}
